2
天氣顧問(代理)
PolyU COMP5511Lab 11 | 2026-03-30
00:00

核心概念 - 大腦與雙手

在先前的實驗中,我們見識到大型語言模型(LLM)的強大,但也發現了一個重大弱點:它們被鎖在箱子裡。它們只知道自己受過訓練的內容,無法與真實世界互動。

AI 代理 透過結合兩個截然不同的元件來解決這個問題:

  • 大腦: 大型語言模型(例如 Qwen3-4B),能理解人類語言、處理邏輯並維持對話脈絡。
  • 雙手: Python 程式碼與外部工具(API),能主動與真實世界互動——例如查詢天氣、瀏覽網際網路或執行計算。
教大腦使用雙手
大型語言模型無法自然地「點擊」按鈕或「執行」Python。今天我們的目標是教大腦辨識何時需要協助,並格式化它的輸出,讓我們的 Python 程式能執行工具 為 它。
A clean, modern conceptual illustration showing a glowing digital brain representing an LLM connected via glowing data lines to a pair of robotic or digital hands manipulating code blocks and gears, representing real-world tools. Minimalist tech aesthetic with light blue and soft orange accent colors.